<%@ page import="edu.polsl.bio.str.manager.logic.DotPlotJobBean" %>
<%@ page import="org.slf4j.Logger" %>
<%@ page import="org.slf4j.LoggerFactory" %>
<%@ page import="org.springframework.context.ApplicationContext" %>
<%@ page import="org.springframework.web.context.support.WebApplicationContextUtils" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>

<%
  Logger log = LoggerFactory.getLogger("edu.polsl.startJob.jsp");

  try {
    ApplicationContext context = WebApplicationContextUtils.getWebApplicationContext(this.getServletConfig().getServletContext());
    DotPlotJobBean dotPlotJobBean = (DotPlotJobBean) context.getBean("dotPlotJobBean");
    Long refId = Long.valueOf(request.getParameter("refId"));
    Long refChromId = Long.valueOf(request.getParameter("refChromId"));
    Long queryId = Long.valueOf(request.getParameter("queryId"));
    Long queryChromId = Long.valueOf(request.getParameter("queryChromId"));

    dotPlotJobBean.handleDotPlotRequest(refId, queryId, refChromId, queryChromId);
  } catch (Exception e) {
    log.error("Exception occurred", e);
    throw e;
  }
%>